package erlwitch.parser.structure;


public class Invocation extends Item {

	private String module;
	private String name;
	private int arity;
	
	public Invocation(int charFrom, int charTo, String name, int arity) {
		super(charFrom, charTo);
		this.module = null;
		this.name = name;
		this.arity = arity;
	}

	public Invocation(int charFrom, int charTo, String module, String name, int arity) {
		super(charFrom, charTo);
		this.module = module;
		this.name = name;
		this.arity = arity;
	}

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getArity() {
		return arity;
	}

	public void setArity(int arity) {
		this.arity = arity;
	}
	
	public String toString() {
		return (module!=null?module+ ":":"")  + name + "/" + arity;
	}	

	public int hashCode() {
		return toString().hashCode();
	}	
}
